let initState = []

export default function reducer(prevState=initState,action){
    let {type,data}=action;
    let newState=JSON.parse(JSON.stringify(prevState))
    switch (type) {
        case 'setData':  
            // newState.forEach((item,index)=>{
            //   if(data.id===item.id){
            //     item.list[data.n].mysuccess=data.mysuccess
            //   }
            // })     
            return newState
    
        default:
            return newState;
    }

}